package dangs.dao;

import java.util.ArrayList;

import org.springframework.orm.ibatis.SqlMapClientTemplate;

import dangs.vo.PayMethodVO;

public class PayMethodDAO {
	private SqlMapClientTemplate client;
	public PayMethodDAO(SqlMapClientTemplate client){
		this.client = client;
	}
	
	public ArrayList<PayMethodVO> selectAllPayMethod(){
		ArrayList<PayMethodVO> list = (ArrayList<PayMethodVO>) client.queryForList("selectAllPayMethod");
		return list;
	}
	public PayMethodVO selectPayMethodByCode(String code){
		PayMethodVO pmvo = (PayMethodVO) client.queryForObject("selectPayMethodByCode", code);
		return pmvo;
	}
	public void insertPayMethod(PayMethodVO pmvo){
		client.insert("insertPayMethod", pmvo);
	}
	public void deletePayMethod(String code){
		client.delete("deletePayMethod", code);
	}
	public void updatePayMethod(PayMethodVO pmvo){
		client.update("updatePayMethod",pmvo);
	}
}
